<!-- start content-outer -->
<div id="content-outer">
<!-- start content -->
<div id="content">


<div id="page-heading"><h1>{$TITLE}</h1></div>


<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
<tr>
	<th rowspan="3" class="sized"><img src="{$smarty.const.URL_IMAGENS}forms/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
	<th class="topleft"></th>
	<td id="tbl-border-top">&nbsp;</td>
	<th class="topright"></th>
	<th rowspan="3" class="sized"><img src="{$smarty.const.URL_IMAGENS}forms/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
</tr>
<tr>
	<td id="tbl-border-left"></td>
	<td>
	<!--  start content-table-inner -->
	<div id="content-table-inner">
	
	<table border="0" width="100%" cellpadding="0" cellspacing="0">
	<tr valign="top">
	<td>
	
			<!-- start id-form -->
		<form id="formulario" action="{$LINK_ACTION}" method="post" enctype="multipart/form-data">
			<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
				{if $PRE_CAMPOS != ''}
					<tr>
						<td colspan="3">
							{$PRE_CAMPOS}
						</td>
					</tr>
				{/if}
			
				{section name="campos" loop=$CAMPOS_FORM.ordem}
					{assign var="qtd" value=$CAMPOS_FORM.ordem[campos]|strlen}
					{assign var="abreClass" value=$CAMPOS_FORM.ordem[campos]|substr:0:11}
					{assign var="fechaClass" value=$CAMPOS_FORM.ordem[campos]|substr:0:12}
				
					{if $abreClass == "|abreClass|"}
						{assign var="nomeClass" value=$CAMPOS_FORM.ordem[campos]|substr:11:$qtd}
						{assign var="class" value=$nomeClass}
					{elseif $fechaClass == "|fechaClass|"}
						{assign var="class" value=""}
					{else}
						<tr {if $class != ''}class="{$class}"{/if}>
							{section name="tx" loop=$CAMPOS_FORM.text}
								{if $CAMPOS_FORM.ordem[campos] == $CAMPOS_FORM.text[tx].campo.name}
									<th valign="top">
										{$CAMPOS_FORM.text[tx].label.texto}
										{if $CAMPOS_FORM.text[tx].obrigatorio}*{/if}:
									</th>
									<td>
										<input 
											type="text" 
											name="{$CAMPOS_FORM.text[tx].campo.name}" 
											id="{if $CAMPOS_FORM.text[tx].campo.id}{$CAMPOS_FORM.text[tx].campo.id}{else}{$CAMPOS_FORM.text[tx].campo.name}{/if}"
											class="
												inp-form 
												{if $CAMPOS_FORM.text[tx].obrigatorio} required{/if} 
												{if $CAMPOS_FORM.text[tx].msg_erro} inp-form-error{/if}
												{if $CAMPOS_FORM.text[tx].campo.class} {$CAMPOS_FORM.text[tx].campo.class}{/if} 
											" 
											{if $CAMPOS_FORM.text[tx].campo.maxlength}maxlength="{$CAMPOS_FORM.text[tx].campo.maxlength}"{/if} 
											value="{$CAMPOS_FORM.text[tx].campo.value}" 
										/>
									</td>
									<td class="{$CAMPOS_FORM.text[tx].campo.name}_error">
										{if $CAMPOS_FORM.text[tx].msg_erro}
										<div class="error-left"></div>
										<div class="error-inner">{$CAMPOS_FORM.text[tx].msg_erro}</div>
										{/if}
									</td>
								{/if}
							{/section}
							
							{section name="pw" loop=$CAMPOS_FORM.password}
								{if $CAMPOS_FORM.ordem[campos] == $CAMPOS_FORM.password[pw].campo.name}
									<th valign="top">
										{$CAMPOS_FORM.password[pw].label.texto}
										{if $CAMPOS_FORM.password[pw].obrigatorio}*{/if}:
									</th>
									<td>
										<input 
											type="password" 
											name="{$CAMPOS_FORM.password[pw].campo.name}" 
											id="{if $CAMPOS_FORM.password[pw].campo.id}{$CAMPOS_FORM.password[pw].campo.id}{else}{$CAMPOS_FORM.password[pw].campo.name}{/if}"
											class="
												inp-form 
												{if $CAMPOS_FORM.password[pw].obrigatorio} required{/if} 
												{if $CAMPOS_FORM.password[pw].msg_erro} inp-form-error{/if}
												{if $CAMPOS_FORM.password[pw].campo.class} {$CAMPOS_FORM.password[pw].campo.class}{/if} 
											" 
											{if $CAMPOS_FORM.password[pw].campo.maxlength}maxlength="{$CAMPOS_FORM.password[pw].campo.maxlength}"{/if} 
											value="{$CAMPOS_FORM.password[pw].campo.value}" 
										/>
									</td>
									<td class="{$CAMPOS_FORM.password[pw].campo.name}_error">
										{if $CAMPOS_FORM.password[pw].msg_erro}
										<div class="error-left"></div>
										<div class="error-inner">{$CAMPOS_FORM.password[pw].msg_erro}</div>
										{/if}
									</td>
								{/if}
							{/section}
		
							{section name="ta" loop=$CAMPOS_FORM.textarea}
								{if $CAMPOS_FORM.ordem[campos] == $CAMPOS_FORM.textarea[ta].campo.name}
									<th valign="top">
										{$CAMPOS_FORM.textarea[ta].label.texto}
										{if $CAMPOS_FORM.textarea[ta].obrigatorio}*{/if}:
									</th>
									<td>
										<textarea 
											name="{$CAMPOS_FORM.textarea[ta].campo.name}" 
											id="{if $CAMPOS_FORM.textarea[ta].campo.id}{$CAMPOS_FORM.textarea[ta].campo.id}{else}{$CAMPOS_FORM.textarea[ta].campo.name}{/if}"
											class="
												form-textarea 
												{if $CAMPOS_FORM.textarea[ta].obrigatorio} required{/if} 
												{if $CAMPOS_FORM.textarea[ta].msg_erro} inp-form-error{/if}
											" 
											{if $CAMPOS_FORM.textarea[ta].campo.maxlength}maxlength="{$CAMPOS_FORM.textarea[ta].campo.maxlength}"{/if} 
										>{$CAMPOS_FORM.textarea[ta].campo.value}</textarea>
									</td>
									<td class="{$CAMPOS_FORM.textarea[ta].campo.name}_error">
										{if $CAMPOS_FORM.textarea[ta].msg_erro}
										<div class="error-left"></div>
										<div class="error-inner">{$CAMPOS_FORM.textarea[ta].msg_erro}</div>
										{/if}
									</td>
								{/if}
							{/section}
		
							{section name="sl" loop=$CAMPOS_FORM.select}
								{if $CAMPOS_FORM.ordem[campos] == $CAMPOS_FORM.select[sl].campo.name}
									<th valign="top">
										{$CAMPOS_FORM.select[sl].label.texto}
										{if $CAMPOS_FORM.select[sl].obrigatorio}*{/if}:
									</th>
									<td>
										<select 
											name="{$CAMPOS_FORM.select[sl].campo.name}"
											id="{if $CAMPOS_FORM.select[sl].campo.id}{$CAMPOS_FORM.select[sl].campo.id}{else}{$CAMPOS_FORM.select[sl].campo.name}{/if}"
											class="
												styledselect_form_1
												{if $CAMPOS_FORM.select[sl].obrigatorio} required{/if} 
												{if $CAMPOS_FORM.select[sl].msg_erro} inp-form-error{/if}
											" 
											{if $CAMPOS_FORM.select[sl].campo.onchange} onchange="{$CAMPOS_FORM.select[sl].campo.onchange}"{/if}
											{if $CAMPOS_FORM.select[sl].campo.disabled} disabled="disabled"{/if}
										>
											<option value="0">Selecione...</option>
											{section name="op" loop=$CAMPOS_FORM.select[sl].campo.valores}
												<option 
													{if $CAMPOS_FORM.select[sl].campo.valores[op].style} style="{$CAMPOS_FORM.select[sl].campo.valores[op].style}"{/if}
													value="{$CAMPOS_FORM.select[sl].campo.valores[op].value}" 
													{if $CAMPOS_FORM.select[sl].campo.value == $CAMPOS_FORM.select[sl].campo.valores[op].value}selected="selected"{/if}
												>
													{$CAMPOS_FORM.select[sl].campo.valores[op].text}
												</option>
											{/section}
										</select>
									</td>
									<td class="{$CAMPOS_FORM.select[sl].campo.name}_error">
										{if $CAMPOS_FORM.select[sl].msg_erro}
										<div class="error-left"></div>
										<div class="error-inner">{$CAMPOS_FORM.select[sl].msg_erro}</div>
										{/if}
									</td>
								{/if}
							{/section}
							
							{section name="rd" loop=$CAMPOS_FORM.radio}
								{if $CAMPOS_FORM.ordem[campos] == $CAMPOS_FORM.radio[rd].campo.name}
									<th valign="top">
										{$CAMPOS_FORM.radio[rd].label.texto}
										{if $CAMPOS_FORM.radio[rd].obrigatorio}*{/if}:
									</th>
									<td>
										{section name="op" loop=$CAMPOS_FORM.radio[rd].campo.valores}
											<input type="radio" 
												name="{$CAMPOS_FORM.radio[rd].campo.name}"
												id="{if $CAMPOS_FORM.radio[rd].campo.id}{$CAMPOS_FORM.radio[rd].campo.id}{else}{$CAMPOS_FORM.radio[rd].campo.name}{/if}"
												class="
													radio
													{if $CAMPOS_FORM.radio[rd].obrigatorio} required{/if} 
													{if $CAMPOS_FORM.radio[rd].msg_erro} inp-form-error{/if}
												" 
												{if $CAMPOS_FORM.radio[rd].campo.onchange} onchange="{$CAMPOS_FORM.radio[rd].campo.onchange}"{/if}
												{if $CAMPOS_FORM.radio[rd].campo.disabled} disabled="disabled"{/if}
												{if $CAMPOS_FORM.radio[rd].campo.valores[op].style} style="{$CAMPOS_FORM.radio[rd].campo.valores[op].style}"{/if}
												{if $CAMPOS_FORM.radio[rd].campo.value == $CAMPOS_FORM.radio[rd].campo.valores[op].value}checked{/if}
												value="{$CAMPOS_FORM.radio[rd].campo.valores[op].value}" 
											>
											{$CAMPOS_FORM.radio[rd].campo.valores[op].text}
											</option>
										{/section}
									</td>
									<td class="{$CAMPOS_FORM.radio[rd].campo.name}_error">
										{if $CAMPOS_FORM.radio[rd].msg_erro}
										<div class="error-left"></div>
										<div class="error-inner">{$CAMPOS_FORM.radio[rd].msg_erro}</div>
										{/if}
									</td>
								{/if}
							{/section}
						</tr>
					{/if}
				{/section}
				{if $CONTEUDO_EXTRA != ''}
					<tr>
						<td colspan="3">
							{$CONTEUDO_EXTRA}
						</td>
					</tr>
				{/if}
				<tr>
					<th>
						{section name="hd" loop=$CAMPOS_FORM.hidden}
							<input type="hidden" 
								name="{$CAMPOS_FORM.hidden[hd].campo.name}"
								id="{if $CAMPOS_FORM.hidden[hd].campo.id}{$CAMPOS_FORM.hidden[hd].campo.id}{else}{$CAMPOS_FORM.hidden[hd].campo.name}{/if}" 
								value="{$CAMPOS_FORM.hidden[hd].campo.value}"
							 />
						{/section}
					</th>
					<td valign="top">
						<input type="button" value="" onclick="verificaForm()" class="form-submit" />
						<input type="reset" value="" class="form-reset"  />
					</td>
					<td></td>
				</tr>
			</table>
		</form>
			<!-- end id-form  -->

	</td>
	<td>

	{if $ADICIONAR || $LISTAR}
	<!--  start related-activities -->
	<div id="related-activities">
		
		<!--  start related-act-top -->
		<div id="related-act-top">
			<img src="{$smarty.const.URL_IMAGENS}forms/forms/header_related_act.gif" width="271" height="43" alt="" />
		</div>
		<!-- end related-act-top -->
		
		<!--  start related-act-bottom -->
		<div id="related-act-bottom">
		
			<!--  start related-act-inner -->
			<div id="related-act-inner">
			
				<div class="left"><img src="{$smarty.const.URL_IMAGENS}forms/forms/icon_plus.gif" width="21" height="21" alt="" /></div>
				<div class="right">
					<h5>{$ADICIONAR.title}</h5>
					<ul class="greyarrow">
						{section name="addOpt" loop=$ADICIONAR.opcoes}
							<li><a href="{$ADICIONAR.opcoes[addOpt].link}">{$ADICIONAR.opcoes[addOpt].texto}</a></li>
						{/section} 
					</ul>
				</div>
				
				<div class="clear"></div>
				<div class="lines-dotted-short"></div>
				
				<div class="left"><a href=""><img src="{$smarty.const.URL_IMAGENS}forms/forms/icon_edit.gif" width="21" height="21" alt="" /></a></div>
				<div class="right">
					<h5>{$LISTAR.title}</h5>
					<ul class="greyarrow">
						{section name="lstOpt" loop=$LISTAR.opcoes}
							<li><a href="{$LISTAR.opcoes[lstOpt].link}">{$LISTAR.opcoes[lstOpt].texto}</a></li>
						{/section} 
					</ul>
				</div>
				<div class="clear"></div>
				
			</div>
			<!-- end related-act-inner -->
			<div class="clear"></div>
		
		</div>
		<!-- end related-act-bottom -->
	
	</div>
	<!-- end related-activities -->
	{/if}
	
</td>
</tr>
<tr>
<td><img src="{$smarty.const.URL_IMAGENS}forms/shared/blank.gif" width="695" height="1" alt="blank" /></td>
<td></td>
</tr>
</table>
 
<div class="clear"></div> 

</div>
<!--  end content-table-inner  -->
</td>
<td id="tbl-border-right"></td>
</tr>
<tr>
	<th class="sized bottomleft"></th>
	<td id="tbl-border-bottom">&nbsp;</td>
	<th class="sized bottomright"></th>
</tr>
</table>